<?php

namespace app\controller\Request;

abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
{
    protected string $endpoint = 'https://openapi.hwkjpay.com/gateway.do';

    /**
     * Get the request endpoint.
     *
     * @return string
     */
    public function getEndpoint(): string
    {
        return $this->endpoint;
    }

    /**
     * Sets the request merchant code.
     *
     * @param string $mchNo
     * @return AbstractRequest
     */
    public function setMchNo(string $mchNo): AbstractRequest
    {
        return $this->setParameter('mchNo', $mchNo);
    }

    /**
     * Get the request merchant code.
     *
     * @return string
     */
    public function getMchNo(): string
    {
        return $this->getParameter('mchNo');
    }

    /**
     * Sets the request app private key.
     *
     * @param string $appPrivateKey
     * @return AbstractRequest
     */
    public function setAppPrivateKey(string $appPrivateKey): AbstractRequest
    {
        return $this->setParameter('appPrivateKey', $appPrivateKey);
    }

    /**
     * Get the request app private key.
     *
     * @return string
     */
    public function getAppPrivateKey(): string
    {
        return $this->getParameter('appPrivateKey');
    }

    /**
     * Sets the request hw public key.
     *
     * @param string $alipayPublicKey
     * @return AbstractRequest
     */
    public function setHwPublicKey(string $alipayPublicKey): AbstractRequest
    {
        return $this->setParameter('hwPublicKey', $alipayPublicKey);
    }

    /**
     * Get the request hw public key.
     *
     * @return string
     */
    public function getHwPublicKey(): string
    {
        return $this->getParameter('hwPublicKey');
    }

    /**
     * Sets the request bizContent.
     *
     * @param string $bizContent
     * @return AbstractRequest
     */
    public function setBizContent(string $bizContent): AbstractRequest
    {
        return $this->setParameter('bizContent', $bizContent);
    }

    /**
     * Get the request bizContent.
     *
     * @return string
     */
    public function getBizContent(): string
    {
        return $this->getParameter('bizContent');
    }

    /**
     * Sets the request params.
     *
     * @param string sign
     * @return AbstractRequest
     */
    public function setSign(string $sign): AbstractRequest
    {
        return $this->setParameter('sign', $sign);
    }

    /**
     * Get the request sign.
     *
     * @return string
     */
    public function getSign(): string
    {
        return $this->getParameter('sign');
    }

    /**
     * Sets the request params.
     *
     * @param array $params
     * @return AbstractRequest
     */
    public function setParams(array $params): AbstractRequest
    {
        return $this->setParameter('params', $params);
    }

    /**
     * Get the request params.
     *
     * @return array
     */
    public function getParams(): array
    {
        return $this->getParameter('params');
    }

    /**
     * Sets the request payer id.
     *
     * @param string $payerId
     * @return AbstractRequest
     */
    public function setPayerId(string $payerId): AbstractRequest
    {
        return $this->setParameter('payerId', $payerId);
    }

    /**
     * Get the request payer id.
     *
     * @return string
     */
    public function getPayerId(): string
    {
        return $this->getParameter('payerId');
    }
}
